//
//  RedVC.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/6.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "RedVC.h"
#import "Red_SubVC.h"  //查看红包记录

#import "Red_HeaderView.h"
#import "Red_BillTableViewCell.h"
@interface RedVC ()

@end

@implementation RedVC
-(void)addNavbarView{
    
    [super addNavbarView];
    self.title=@"钱包";
    
    [self configNavigationBarRightTitle:@"提现记录"];
}
-(void)configOwnViews{
    
    [super configOwnViews];
}
-(void)addOwnViews{
    
    [super addOwnViews];
    
    [self addTableHeaderView];
}
-(void)registerCellClass{
    
    [super registerCellClass];
    [self.tableView registerClass:[Red_BillTableViewCell class] forCellReuseIdentifier:[Red_BillTableViewCell cellIdentifier]];
}
#pragma mark 添加头部视图
-(void)addTableHeaderView{
    
    
    Red_HeaderView *headerView=[[Red_HeaderView alloc] initWithFrame:CGRectMake(0, 0, kMainScreenWidth, kMainScreenWidth*0.5)];
    [headerView setBackgroundColor:kWhiteColor];
    self.tableView.tableHeaderView=headerView;
}
#pragma mark  UITableViewDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 20;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    Red_BillTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:[Red_BillTableViewCell cellIdentifier] forIndexPath:indexPath];
    return cell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 45;
}
#pragma mark right事件处理
- (void)navigationBarRightButtonTapped:(UIButton *)sender
{
    [self.navigationController pushViewController:[Red_SubVC new] animated:YES];
}


@end
